home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE23 / PZAZZDEM / PZAZZDEM.ZIP / PZDEMO / PZDBITBT.PAS < prev    next >
Pascal/Delphi Source File  |  1997-03-03  |  2KB  |  72 lines

  1. unit Pzdbitbt;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, ExtCtrls, PZBPanel, PZShaded, StdCtrls, PZLabel, PZSpButt,
  8.   Menus, Pzbitbtn;
  9.  
  10. type
  11.   TPZBitmapButtonForm = class(TForm)
  12.     HeaderPanel: TPZBitmapPanel;
  13.     PZShaded1: TPZShaded;
  14.     DescrPanel: TPZBitmapPanel;
  15.     PZLabel4: TPZLabel;
  16.     ResultsPanel: TPZBitmapPanel;
  17.     PZLabel5: TPZLabel;
  18.     PZLabel2: TPZLabel;
  19.     OutputPanel1: TPZBitmapPanel;
  20.     PZLabel1: TPZLabel;
  21.     ClickedLabel: TPZLabel;
  22.     OKButton: TPZBitmapButton;
  23.     CancelButton: TPZBitmapButton;
  24.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  25.     procedure FormCreate(Sender: TObject);
  26.     procedure FormDeactivate(Sender: TObject);
  27.   private
  28.     { Private declarations }
  29.   public
  30.     { Public declarations }
  31.   end;
  32.  
  33. var
  34.   PZBitmapButtonForm: TPZBitmapButtonForm;
  35.  
  36. implementation
  37.  
  38. Uses PZDMain;
  39.  
  40. {$R *.DFM}
  41.  
  42. procedure TPZBitmapButtonForm.FormCreate(Sender: TObject);
  43.  
  44. Var
  45.   w :Integer;
  46.  
  47. Begin
  48.   SetBounds(10,10,MainForm.ClientWidth-20,MainForm.ClientHeight-MainForm.MainPanel.Height-20);
  49.   HeaderPanel.Background.LoadBitmap('PZD_STONE');
  50.   DescrPanel.Background.LoadBitmap('PZD_STONE');
  51.   ResultsPanel.Background.LoadBitmap('PZD_STONE');
  52.   OutputPanel1.Background.LoadBitmap('PZD_STONE');
  53.   OKButton.LoadBitmap('PZD_MARBLE');
  54.   CancelButton.LoadBitmap('PZD_MARBLE');
  55.   w:=OKButton.Width+16+CancelButton.ClientWidth;
  56.   OKButton.Left:=(OutputPanel1.Width Div 2)-(w Div 2);
  57.   CancelButton.Left:=OKButton.Left+OKButton.Width+16;
  58. End;
  59.  
  60. procedure TPZBitmapButtonForm.FormClose(Sender: TObject;  var Action: TCloseAction);
  61.  
  62. Begin
  63.   Action:=caFree;
  64. End;
  65.  
  66. procedure TPZBitmapButtonForm.FormDeactivate(Sender: TObject);
  67. begin
  68.   Close;
  69. end;
  70.  
  71. end.
  72.